package com.itheima.UDPTest.test04;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class Send {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        DatagramPacket dp = new DatagramPacket("对A".getBytes(),
                "对A".getBytes().length,
                InetAddress.getByName("255.255.255.255"),
                10000);

        ds.send(dp);
        ds.close();
    }
}
